\(\int (a+\frac {b}{x})^{3/2} (c+\frac {d}{x}) \, dx\) [233]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [F(-2)]
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 19, antiderivative size = 100 \[ \int \left (a+\frac {b}{x}\right )^{3/2} \left (c+\frac {d}{x}\right ) \, dx=-\left ((3 b c+2 a d) \sqrt {a+\frac {b}{x}}\right )-\frac {(3 b c+2 a d) \left (a+\frac {b}{x}\right )^{3/2}}{3 a}+\frac {c \left (a+\frac {b}{x}\right )^{5/2} x}{a}+\sqrt {a} (3 b c+2 a d) \text {arctanh}\left (\frac {\sqrt {a+\frac {b}{x}}}{\sqrt {a}}\right ) \]

[Out]

-1/3*(2*a*d+3*b*c)*(a+b/x)^(3/2)/a+c*(a+b/x)^(5/2)*x/a+(2*a*d+3*b*c)*arctanh((a+b/x)^(1/2)/a^(1/2))*a^(1/2)-(2
*a*d+3*b*c)*(a+b/x)^(1/2)

Rubi [A] (verified)

Time = 0.05 (sec) , antiderivative size = 100, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.263, Rules used = {382, 79, 52, 65, 214} \[ \int \left (a+\frac {b}{x}\right )^{3/2} \left (c+\frac {d}{x}\right ) \, dx=\sqrt {a} \text {arctanh}\left (\frac {\sqrt {a+\frac {b}{x}}}{\sqrt {a}}\right ) (2 a d+3 b c)-\frac {\left (a+\frac {b}{x}\right )^{3/2} (2 a d+3 b c)}{3 a}-\sqrt {a+\frac {b}{x}} (2 a d+3 b c)+\frac {c x \left (a+\frac {b}{x}\right )^{5/2}}{a} \]

[In]

Int[(a + b/x)^(3/2)*(c + d/x),x]

[Out]

-((3*b*c + 2*a*d)*Sqrt[a + b/x]) - ((3*b*c + 2*a*d)*(a + b/x)^(3/2))/(3*a) + (c*(a + b/x)^(5/2)*x)/a + Sqrt[a]
*(3*b*c + 2*a*d)*ArcTanh[Sqrt[a + b/x]/Sqrt[a]]

Rule 52

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(a + b*x)^(m + 1)*((c + d*x)^n/(b*(
m + n + 1))), x] + Dist[n*((b*c - a*d)/(b*(m + n + 1))), Int[(a + b*x)^m*(c + d*x)^(n - 1), x], x] /; FreeQ[{a
, b, c, d}, x] && NeQ[b*c - a*d, 0] && GtQ[n, 0] && NeQ[m + n + 1, 0] &&  !(IGtQ[m, 0] && ( !IntegerQ[n] || (G
tQ[m, 0] && LtQ[m - n, 0]))) &&  !ILtQ[m + n + 2, 0] && IntLinearQ[a, b, c, d, m, n, x]

Rule 65

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 79

Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Simp[(-(b*e - a*f
))*(c + d*x)^(n + 1)*((e + f*x)^(p + 1)/(f*(p + 1)*(c*f - d*e))), x] - Dist[(a*d*f*(n + p + 2) - b*(d*e*(n + 1
) + c*f*(p + 1)))/(f*(p + 1)*(c*f - d*e)), Int[(c + d*x)^n*(e + f*x)^(p + 1), x], x] /; FreeQ[{a, b, c, d, e,
f, n}, x] && LtQ[p, -1] && ( !LtQ[n, -1] || IntegerQ[p] ||  !(IntegerQ[n] ||  !(EqQ[e, 0] ||  !(EqQ[c, 0] || L
tQ[p, n]))))

Rule 214

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x/Rt[-a/b, 2]], x] /; FreeQ[{a, b},
x] && NegQ[a/b]

Rule 382

Int[((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> -Subst[Int[(a + b/x^n)^p*((c +
 d/x^n)^q/x^2), x], x, 1/x] /; FreeQ[{a, b, c, d, p, q}, x] && NeQ[b*c - a*d, 0] && ILtQ[n, 0]

Rubi steps \begin{align*} \text {integral}& = -\text {Subst}\left (\int \frac {(a+b x)^{3/2} (c+d x)}{x^2} \, dx,x,\frac {1}{x}\right ) \\ & = \frac {c \left (a+\frac {b}{x}\right )^{5/2} x}{a}-\frac {\left (\frac {3 b c}{2}+a d\right ) \text {Subst}\left (\int \frac {(a+b x)^{3/2}}{x} \, dx,x,\frac {1}{x}\right )}{a} \\ & = -\frac {(3 b c+2 a d) \left (a+\frac {b}{x}\right )^{3/2}}{3 a}+\frac {c \left (a+\frac {b}{x}\right )^{5/2} x}{a}-\frac {1}{2} (3 b c+2 a d) \text {Subst}\left (\int \frac {\sqrt {a+b x}}{x} \, dx,x,\frac {1}{x}\right ) \\ & = -\left ((3 b c+2 a d) \sqrt {a+\frac {b}{x}}\right )-\frac {(3 b c+2 a d) \left (a+\frac {b}{x}\right )^{3/2}}{3 a}+\frac {c \left (a+\frac {b}{x}\right )^{5/2} x}{a}-\frac {1}{2} (a (3 b c+2 a d)) \text {Subst}\left (\int \frac {1}{x \sqrt {a+b x}} \, dx,x,\frac {1}{x}\right ) \\ & = -\left ((3 b c+2 a d) \sqrt {a+\frac {b}{x}}\right )-\frac {(3 b c+2 a d) \left (a+\frac {b}{x}\right )^{3/2}}{3 a}+\frac {c \left (a+\frac {b}{x}\right )^{5/2} x}{a}-\frac {(a (3 b c+2 a d)) \text {Subst}\left (\int \frac {1}{-\frac {a}{b}+\frac {x^2}{b}} \, dx,x,\sqrt {a+\frac {b}{x}}\right )}{b} \\ & = -\left ((3 b c+2 a d) \sqrt {a+\frac {b}{x}}\right )-\frac {(3 b c+2 a d) \left (a+\frac {b}{x}\right )^{3/2}}{3 a}+\frac {c \left (a+\frac {b}{x}\right )^{5/2} x}{a}+\sqrt {a} (3 b c+2 a d) \tanh ^{-1}\left (\frac {\sqrt {a+\frac {b}{x}}}{\sqrt {a}}\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.26 (sec) , antiderivative size = 73, normalized size of antiderivative = 0.73 \[ \int \left (a+\frac {b}{x}\right )^{3/2} \left (c+\frac {d}{x}\right ) \, dx=\frac {\sqrt {a+\frac {b}{x}} (a x (-8 d+3 c x)-2 b (d+3 c x))}{3 x}+\sqrt {a} (3 b c+2 a d) \text {arctanh}\left (\frac {\sqrt {a+\frac {b}{x}}}{\sqrt {a}}\right ) \]

[In]

Integrate[(a + b/x)^(3/2)*(c + d/x),x]

[Out]

(Sqrt[a + b/x]*(a*x*(-8*d + 3*c*x) - 2*b*(d + 3*c*x)))/(3*x) + Sqrt[a]*(3*b*c + 2*a*d)*ArcTanh[Sqrt[a + b/x]/S
qrt[a]]

Maple [A] (verified)

Time = 0.09 (sec) , antiderivative size = 105, normalized size of antiderivative = 1.05

method result size
risch \(\frac {\left (3 a c \,x^{2}-8 a d x -6 b c x -2 b d \right ) \sqrt {\frac {a x +b}{x}}}{3 x}+\frac {\left (2 a d +3 b c \right ) \sqrt {a}\, \ln \left (\frac {\frac {b}{2}+a x}{\sqrt {a}}+\sqrt {a \,x^{2}+b x}\right ) \sqrt {\frac {a x +b}{x}}\, \sqrt {x \left (a x +b \right )}}{2 a x +2 b}\) \(105\)
default \(\frac {\sqrt {\frac {a x +b}{x}}\, \left (12 a^{\frac {5}{2}} \sqrt {a \,x^{2}+b x}\, d \,x^{3}+18 a^{\frac {3}{2}} \sqrt {a \,x^{2}+b x}\, b c \,x^{3}-12 a^{\frac {3}{2}} \left (a \,x^{2}+b x \right )^{\frac {3}{2}} d x +6 \ln \left (\frac {2 \sqrt {a \,x^{2}+b x}\, \sqrt {a}+2 a x +b}{2 \sqrt {a}}\right ) a^{2} b d \,x^{3}+9 \ln \left (\frac {2 \sqrt {a \,x^{2}+b x}\, \sqrt {a}+2 a x +b}{2 \sqrt {a}}\right ) a \,b^{2} c \,x^{3}-12 \sqrt {a}\, \left (a \,x^{2}+b x \right )^{\frac {3}{2}} b c x -4 d \left (a \,x^{2}+b x \right )^{\frac {3}{2}} \sqrt {a}\, b \right )}{6 x^{2} \sqrt {x \left (a x +b \right )}\, \sqrt {a}\, b}\) \(205\)

[In]

int((a+b/x)^(3/2)*(c+d/x),x,method=_RETURNVERBOSE)

[Out]

1/3*(3*a*c*x^2-8*a*d*x-6*b*c*x-2*b*d)/x*((a*x+b)/x)^(1/2)+1/2*(2*a*d+3*b*c)*a^(1/2)*ln((1/2*b+a*x)/a^(1/2)+(a*
x^2+b*x)^(1/2))*((a*x+b)/x)^(1/2)*(x*(a*x+b))^(1/2)/(a*x+b)

Fricas [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 164, normalized size of antiderivative = 1.64 \[ \int \left (a+\frac {b}{x}\right )^{3/2} \left (c+\frac {d}{x}\right ) \, dx=\left [\frac {3 \, {\left (3 \, b c + 2 \, a d\right )} \sqrt {a} x \log \left (2 \, a x + 2 \, \sqrt {a} x \sqrt {\frac {a x + b}{x}} + b\right ) + 2 \, {\left (3 \, a c x^{2} - 2 \, b d - 2 \, {\left (3 \, b c + 4 \, a d\right )} x\right )} \sqrt {\frac {a x + b}{x}}}{6 \, x}, -\frac {3 \, {\left (3 \, b c + 2 \, a d\right )} \sqrt {-a} x \arctan \left (\frac {\sqrt {-a} \sqrt {\frac {a x + b}{x}}}{a}\right ) - {\left (3 \, a c x^{2} - 2 \, b d - 2 \, {\left (3 \, b c + 4 \, a d\right )} x\right )} \sqrt {\frac {a x + b}{x}}}{3 \, x}\right ] \]

[In]

integrate((a+b/x)^(3/2)*(c+d/x),x, algorithm="fricas")

[Out]

[1/6*(3*(3*b*c + 2*a*d)*sqrt(a)*x*log(2*a*x + 2*sqrt(a)*x*sqrt((a*x + b)/x) + b) + 2*(3*a*c*x^2 - 2*b*d - 2*(3
*b*c + 4*a*d)*x)*sqrt((a*x + b)/x))/x, -1/3*(3*(3*b*c + 2*a*d)*sqrt(-a)*x*arctan(sqrt(-a)*sqrt((a*x + b)/x)/a)
 - (3*a*c*x^2 - 2*b*d - 2*(3*b*c + 4*a*d)*x)*sqrt((a*x + b)/x))/x]

Sympy [A] (verification not implemented)

Time = 14.38 (sec) , antiderivative size = 177, normalized size of antiderivative = 1.77 \[ \int \left (a+\frac {b}{x}\right )^{3/2} \left (c+\frac {d}{x}\right ) \, dx=\sqrt {a} b c \operatorname {asinh}{\left (\frac {\sqrt {a} \sqrt {x}}{\sqrt {b}} \right )} + a \sqrt {b} c \sqrt {x} \sqrt {\frac {a x}{b} + 1} - a d \left (\begin {cases} \frac {2 a \operatorname {atan}{\left (\frac {\sqrt {a + \frac {b}{x}}}{\sqrt {- a}} \right )}}{\sqrt {- a}} + 2 \sqrt {a + \frac {b}{x}} & \text {for}\: b \neq 0 \\- \sqrt {a} \log {\left (x \right )} & \text {otherwise} \end {cases}\right ) - b c \left (\begin {cases} \frac {2 a \operatorname {atan}{\left (\frac {\sqrt {a + \frac {b}{x}}}{\sqrt {- a}} \right )}}{\sqrt {- a}} + 2 \sqrt {a + \frac {b}{x}} & \text {for}\: b \neq 0 \\- \sqrt {a} \log {\left (x \right )} & \text {otherwise} \end {cases}\right ) + b d \left (\begin {cases} - \frac {\sqrt {a}}{x} & \text {for}\: b = 0 \\- \frac {2 \left (a + \frac {b}{x}\right )^{\frac {3}{2}}}{3 b} & \text {otherwise} \end {cases}\right ) \]

[In]

integrate((a+b/x)**(3/2)*(c+d/x),x)

[Out]

sqrt(a)*b*c*asinh(sqrt(a)*sqrt(x)/sqrt(b)) + a*sqrt(b)*c*sqrt(x)*sqrt(a*x/b + 1) - a*d*Piecewise((2*a*atan(sqr
t(a + b/x)/sqrt(-a))/sqrt(-a) + 2*sqrt(a + b/x), Ne(b, 0)), (-sqrt(a)*log(x), True)) - b*c*Piecewise((2*a*atan
(sqrt(a + b/x)/sqrt(-a))/sqrt(-a) + 2*sqrt(a + b/x), Ne(b, 0)), (-sqrt(a)*log(x), True)) + b*d*Piecewise((-sqr
t(a)/x, Eq(b, 0)), (-2*(a + b/x)**(3/2)/(3*b), True))

Maxima [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 132, normalized size of antiderivative = 1.32 \[ \int \left (a+\frac {b}{x}\right )^{3/2} \left (c+\frac {d}{x}\right ) \, dx=\frac {1}{2} \, {\left (2 \, \sqrt {a + \frac {b}{x}} a x - 3 \, \sqrt {a} b \log \left (\frac {\sqrt {a + \frac {b}{x}} - \sqrt {a}}{\sqrt {a + \frac {b}{x}} + \sqrt {a}}\right ) - 4 \, \sqrt {a + \frac {b}{x}} b\right )} c - \frac {1}{3} \, {\left (3 \, a^{\frac {3}{2}} \log \left (\frac {\sqrt {a + \frac {b}{x}} - \sqrt {a}}{\sqrt {a + \frac {b}{x}} + \sqrt {a}}\right ) + 2 \, {\left (a + \frac {b}{x}\right )}^{\frac {3}{2}} + 6 \, \sqrt {a + \frac {b}{x}} a\right )} d \]

[In]

integrate((a+b/x)^(3/2)*(c+d/x),x, algorithm="maxima")

[Out]

1/2*(2*sqrt(a + b/x)*a*x - 3*sqrt(a)*b*log((sqrt(a + b/x) - sqrt(a))/(sqrt(a + b/x) + sqrt(a))) - 4*sqrt(a + b
/x)*b)*c - 1/3*(3*a^(3/2)*log((sqrt(a + b/x) - sqrt(a))/(sqrt(a + b/x) + sqrt(a))) + 2*(a + b/x)^(3/2) + 6*sqr
t(a + b/x)*a)*d

Giac [F(-2)]

Exception generated. \[ \int \left (a+\frac {b}{x}\right )^{3/2} \left (c+\frac {d}{x}\right ) \, dx=\text {Exception raised: TypeError} \]

[In]

integrate((a+b/x)^(3/2)*(c+d/x),x, algorithm="giac")

[Out]

Exception raised: TypeError >> an error occurred running a Giac command:INPUT:sage2:=int(sage0,sageVARx):;OUTP
UT:Limit: Max order reached or unable to make series expansion Error: Bad Argument Value

Mupad [B] (verification not implemented)

Time = 6.70 (sec) , antiderivative size = 81, normalized size of antiderivative = 0.81 \[ \int \left (a+\frac {b}{x}\right )^{3/2} \left (c+\frac {d}{x}\right ) \, dx=2\,a^{3/2}\,d\,\mathrm {atanh}\left (\frac {\sqrt {a+\frac {b}{x}}}{\sqrt {a}}\right )-\frac {2\,d\,{\left (a+\frac {b}{x}\right )}^{3/2}}{3}-2\,a\,d\,\sqrt {a+\frac {b}{x}}-\frac {2\,c\,x\,{\left (a+\frac {b}{x}\right )}^{3/2}\,{{}}_2{\mathrm {F}}_1\left (-\frac {3}{2},-\frac {1}{2};\ \frac {1}{2};\ -\frac {a\,x}{b}\right )}{{\left (\frac {a\,x}{b}+1\right )}^{3/2}} \]

[In]

int((a + b/x)^(3/2)*(c + d/x),x)

[Out]

2*a^(3/2)*d*atanh((a + b/x)^(1/2)/a^(1/2)) - (2*d*(a + b/x)^(3/2))/3 - 2*a*d*(a + b/x)^(1/2) - (2*c*x*(a + b/x
)^(3/2)*hypergeom([-3/2, -1/2], 1/2, -(a*x)/b))/((a*x)/b + 1)^(3/2)